﻿using UnityEngine;
using System.Collections;

public class Player : MonoBehaviour 
{
	float pSpeed = 10;
	public int points;
	
	// Use this for initialization
	void Start () 
	{
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Input.GetKey(KeyCode.DownArrow))
			transform.Translate(Vector3.back * Time.deltaTime * pSpeed);
		if(Input.GetKey(KeyCode.UpArrow))
			transform.Translate(Vector3.forward * Time.deltaTime * pSpeed);
		if(Input.GetKey(KeyCode.LeftArrow))
			transform.Translate(Vector3.left * Time.deltaTime * pSpeed);
		if(Input.GetKey(KeyCode.RightArrow))
			transform.Translate(Vector3.right * Time.deltaTime * pSpeed);
		
		PlayerPrefs.SetInt("points", points);
	}
}
